package com.joelemon.mockinfluxdbdata.datamock.v2;

import lombok.Data;

/**
 * @Description: 模拟数据
 * @Author: HJY
 * @Date: 2023/11/29
 */
@Data
public class MockValue {

    private Integer intVal;

    private Double decimalVal;

    private String strVal;

    @Override
    public String toString() {
        if (intVal != null) {
            return intVal.toString();
        }
        if (decimalVal != null) {
            return decimalVal.toString();
        }
        return strVal;
    }

    public Object getVal() {
        if (intVal != null) {
            return intVal;
        }
        if (decimalVal != null) {
            return decimalVal;
        }
        return strVal;
    }
}
